<?php /*a:3:{s:69:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\rechargecard\index.html";i:1591758938;s:64:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\header.html";i:1571626691;s:69:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\admin_items.html";i:1566788179;}*/ ?>
 <!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>DSShop单店铺商城系统后台</title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
        <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
        <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>

        <script type="text/javascript">
            var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
            var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
            var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
            var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
            var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
        </script>
    </head>
    <body>
        <div id="append_parent"></div>
        <div id="ajaxwaitid"></div>








<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>平台充值卡</h3>
                <h5></h5>
            </div>
            <?php if($admin_item): ?>
<ul class="tab-base ds-row">
    <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
    <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<?php endif; ?>
        </div>
    </div>

    <form method="get" name="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>充值卡卡号</dt>
                <dd><input class="txt" type="text" name="sn" id="search-sn" value="<?php echo htmlentities(app('request')->get('sn')); ?>" /></dd>
            </dl>
            <dl>
                <dt>批次标识</dt>
                <dd><input class="txt" type="text" name="batchflag" id="search-batchflag" value="<?php echo htmlentities(app('request')->get('batchflag')); ?>" /></dd>
            </dl>
            <dl>
                <dt>领取状态</dt>
                <dd><select name="state" id="search-state">
                        <option value="">全部</option>
                        <option value="0">未被领取</option>
                        <option value="1">已被领取</option>
                    </select>
                    <script>$('#search-state').val('<?php echo htmlentities(app('request')->get('state')); ?>');</script>
                </dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:document.formSearch.submit();" class="btn " title="<?php echo htmlentities(lang('ds_query')); ?>"><?php echo htmlentities(lang('ds_query')); ?></a>
                <a class="btn btn-default" href="<?php echo url('Rechargecard/index'); ?>" title="<?php echo htmlentities(lang('ds_cancel_search')); ?>"><span><?php echo htmlentities(lang('ds_cancel_search')); ?></span></a>
                <a class="btn" href="javascript:export_xls('<?php echo url('Rechargecard/export_step1'); ?>')" target="_blank"><?php echo htmlentities(lang('ds_export')); ?>Excel</a>
            </div>
        </div>
    </form>

    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
            <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
        </div>
        <ul>
            <li>平台发布充值卡，用户可在会员中心通过输入正确充值卡号的形式对其充值卡账户进行充值。</li>
        </ul>
    </div>
    



        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th class="w24"> </th>
                <th class=" ">充值卡卡号</th>
                <th class=" ">批次标识</th>
                <th class="w60 align-center">面额(元)</th>
                <th class="w96 align-center">发布管理员</th>
                <th class="w150 align-center">发布时间</th>
                <th class="w270 align-center">领取状态</th>
                <th class="w60 align-center"><?php echo htmlentities(lang('ds_handle')); ?> </th>
            </tr>
            </thead>
            <?php if(empty($card_list) || (($card_list instanceof \think\Collection || $card_list instanceof \think\Paginator ) && $card_list->isEmpty())): ?>
            <tbody>
            <tr class="no_data">
                <td colspan="20"><?php echo htmlentities(lang('ds_no_record')); ?></td>
            </tr>
            </tbody>
           <?php else: ?>
            <tbody>
            <?php if(is_array($card_list) || $card_list instanceof \think\Collection || $card_list instanceof \think\Paginator): if( count($card_list)==0 ) : echo "" ;else: foreach($card_list as $key=>$val): ?>
            <tr class="space">
                <td class="w24">
                    <?php if($val['rc_state'] == 0): ?>
                    <input type="checkbox" class="checkitem" name="ids[]" value="<?php echo htmlentities($val['rc_id']); ?>" />
                    <?php else: ?>
                    <input type="checkbox" disabled="disabled" />
                    <?php endif; ?>
                </td>
                <td class=""><?php echo htmlentities($val['rc_sn']); ?></td>
                <td class=""><?php echo htmlentities($val['rc_batchflag']); ?></td>
                <td class="align-center"><?php echo htmlentities($val['rc_denomination']); ?></td>
                <td class="align-center"><?php echo htmlentities($val['rc_admin_name']); ?></td>
                <td class="align-center"><?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($val['rc_tscreated'])? strtotime($val['rc_tscreated']) : $val['rc_tscreated'])); ?></td>
                <td class="align-center">
                    <?php if($val['rc_state'] == 1 && $val['member_id'] >0 && $val['rc_tsused'] >0): ?>
                    会员 <?php echo htmlentities($val['member_name']); ?> 在 <?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($val['rc_tsused'])? strtotime($val['rc_tsused']) : $val['rc_tsused'])); ?>领取
                    <?php else: ?>
                    未被领取
                   <?php endif; ?>
                </td>
                <td class="align-center">
                    <?php if($val['rc_state'] == 0): ?>
                    <a href="javascript:submit_delete(<?php echo htmlentities($val['rc_id']); ?>)" class="normal dsui-btn-del"><i class="iconfont"></i><?php echo htmlentities(lang('ds_del')); ?></a>
                    <?php endif; ?>
                </td>
            </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
                <td colspan="16"><label for="checkallBottom"><?php echo htmlentities(lang('ds_select_all')); ?></label>
                   &nbsp;&nbsp;<a href="javascript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span><?php echo htmlentities(lang('ds_del')); ?></span></a>
                </td>
            </tr>
            </tfoot>
            <?php endif; ?>
        </table>
        
        <?php echo $show_page; ?>


</div>


<script type="text/javascript">
    function submit_delete(ids_str) {
        _uri = ADMINSITEURL + "/Rechargecard/del_card.html?rc_id=" + ids_str;
        dsLayerConfirm(_uri, '<?php echo htmlentities(lang('ds_ensure_del')); ?>');
    }
</script>